<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;


class YaoDivination extends Model
{
    use HasFactory;

    protected $table = 'yao_divination';// 定义模型对应的表名

    protected $guarded = ['id'];

    public function divination()
    {
        return $this->belongsTo(Divination::class, 'divination_id', 'id');
    }

     public function changeDivination()
    {
        return $this->belongsTo(Divination::class, 'by_dividend_id', 'id');
    }

     public function divinationCategoriesRelations()
    {
        return $this->hasMany(DivinationCategoriesRelation::class, 'yao_divination_id', 'id');
    }

    

}
